package belf.migrate.api.source;

import belf.migrate.api.common.JobAware;
import belf.migrate.api.taskconf.JobContext;
import belf.migrate.api.common.PluginIdentifierInterface;
import belf.migrate.api.table.schema.CatalogTable;

import java.io.Serializable;
import java.util.List;

public interface Source extends Serializable, PluginIdentifierInterface, JobAware {

    Boundedness getBoundedness();
    /**
     * Get the catalog tables output by this source, It is recommended that all connectors implement
     * this method. CatalogTable contains more information to help downstream support more accurate
     * and complete synchronization capabilities.
     */
    default List<CatalogTable> getProducedCatalogTables() {
        throw new UnsupportedOperationException(
                "getProducedCatalogTables method has not been implemented.");
    }

    void start();

    void stop();

    void restore(JobContext newJobContext);
}
